<?php
/*
  $Id: get_zones_for_country.php,v 1.23 2003/06/29 22:50:52 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  $country_id = tep_db_prepare_input($HTTP_POST_VARS['country_id']);
  if ($country_id) {
	  $zones_query_raw = "select z.zone_id, z.zone_name from " . TABLE_ZONES . " z where z.zone_country_id=" . $country_id;
	  $zones_query = tep_db_query($zones_query_raw);
	  while ($zone = tep_db_fetch_array($zones_query)) {
		echo '<option country_id='.$country_id." value=".$zone['zone_id'].">".$zone['zone_name']."</option>";
	  }
  }

  require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>